<?php

namespace App\Observers;

use App\Models\AttributeKey;

class AttributeKeyObserver
{
    public function deleting(AttributeKey $key)
    {
        if (has_child($key, 'attributeValues')) {
        	abort(403, "检测到 ({$key->key}) 下有对应商品及属性值");
        }
    }
}
